package Jiemian;

import java.awt.*;
import java.awt.event.ActionListener;

import javax.swing.*;

import ff.*;

public class Caidan extends JPanel{
	private JButton btn_lrx,btn_ygx,btn_wpg,btn_cwg;
	private JButton btn_lrx_xx,btn_lrx_jk,btn_lrx_cw,btn_lrx_gr;
	private JButton btn_ygx_job,btn_ygx_xx,btn_ygx_qx,btn_ygx_kq,btn_ygx_zc;
	private JButton btn_wpg_cc,btn_wpg_dj,btn_wpg_wp,btn_wpg_room,btn_wpg_kc;
	private JButton btn_cwg_jf,btn_cwg_zc;
	private JPanel p1,p2;
	public Caidan(){
		p1=new JPanel();
		p1.setLayout(new GridLayout(12,1));
		p2=new JPanel();
		p1.setOpaque(false);
		btn_lrx=new JButton("老人信息管理   ▼");
		btn_lrx.setBackground(new Color(0,150,250));
		btn_lrx.setForeground(Color.white);
		btn_lrx.setFont(new Font("微软雅黑",1,15));
		btn_ygx=new JButton("员工信息管理   ▼");
	    btn_ygx.setBackground(new Color(0,150,250));
	    btn_ygx.setForeground(Color.white);
	    btn_ygx.setFont(new Font("微软雅黑",1,15));
	    btn_wpg=new JButton("  物品管理  ▼");
	    btn_wpg.setBackground(new Color(0,150,250));
	    btn_wpg.setForeground(Color.white);
	    btn_wpg.setFont(new Font("微软雅黑",1,15));
	    btn_cwg=new JButton("  账务管理   ▼");
	    btn_cwg.setBackground(new Color(0,150,250));
	    btn_cwg.setForeground(Color.white);
	    btn_cwg.setFont(new Font("微软雅黑",1,15));
	    btn_lrx_xx=new JButton("老人信息 ▶");
	    btn_lrx_xx.setBackground(Color.white);
	    btn_lrx_jk=new JButton("添加入住 ▶");
	    btn_lrx_jk.setBackground(Color.white);
	    btn_lrx_cw=new JButton("信息检索 ▶");
	    btn_lrx_cw.setBackground(Color.white);
	    
	    
	    btn_ygx_job=new JButton("员工信息  ▶");
	    btn_ygx_job.setBackground(Color.white);
	    /*btn_ygx_xx=new JButton("部门信息  ▶");
	    btn_ygx_xx.setBackground(Color.white);
	    btn_ygx_qx=new JButton("考勤信息  ▶");
	    btn_ygx_qx.setBackground(Color.white);*/
	    btn_ygx_zc=new JButton("员工注册  ▶");
	    btn_ygx_zc.setBackground(Color.white);
	    btn_ygx_kq=new JButton("信息检索  ▶");
	    btn_ygx_kq.setBackground(Color.white);
	    
	    btn_wpg_cc=new JButton("财产信息  ▶");
	    btn_wpg_cc.setBackground(Color.white);
	    btn_wpg_dj=new JButton("采购单据  ▶");
	    btn_wpg_dj.setBackground(Color.white);
	    btn_wpg_wp=new JButton("物品领用  ▶");
	    btn_wpg_wp.setBackground(Color.white);
	    btn_wpg_room=new JButton("房间信息  ▶");
	    btn_wpg_room.setBackground(Color.white);
	    btn_wpg_kc=new JButton("房间信息检索  ▶");
	    btn_wpg_kc.setBackground(Color.white);
	    
	    
	    btn_cwg_jf=new JButton("缴费信息  ▶");
	    btn_cwg_jf.setBackground(Color.white);
	    btn_cwg_zc=new JButton("支出信息  ▶");
	    btn_cwg_zc.setBackground(Color.white);
	    p1.add(btn_lrx);
	    p1.add(btn_ygx);
	    p1.add(btn_wpg);
	    p1.add(btn_cwg);
	    p2.setLayout(new BorderLayout());
	    p2.setOpaque(false);
	    JScrollPane sr=new JScrollPane(p2);
	    this.setLayout(new BorderLayout());
	    this.add(p1,"West");
	    this.add(sr,"Center");
	    this.setOpaque(false);
	    btn_lrx.addActionListener(new Ff_Caidan(btn_lrx,btn_ygx,btn_wpg,btn_cwg,btn_lrx_xx,btn_lrx_jk,btn_lrx_cw,p1));
	    btn_ygx.addActionListener(new Ff_Caidan(btn_lrx,btn_ygx,btn_wpg,btn_cwg,btn_ygx_job,btn_ygx_kq,btn_ygx_zc,p1));
	    btn_wpg.addActionListener(new Ff_Caidan(btn_lrx,btn_ygx,btn_wpg,btn_cwg,btn_wpg_cc,btn_wpg_dj,btn_wpg_wp,btn_wpg_room,btn_wpg_kc,p1));
	    btn_cwg.addActionListener(new Ff_Caidan(btn_lrx,btn_ygx,btn_wpg,btn_cwg,btn_cwg_jf,btn_cwg_zc,p1));
	    btn_lrx_xx.addActionListener(new Ff_btn_oldxx(btn_lrx_xx,p2));
	    btn_lrx_jk.addActionListener(new Ff_Caidan(btn_lrx_jk,p2));
	    btn_lrx_cw.addActionListener(new Ff_btn_oldselect(btn_lrx_cw,p2));
	    btn_ygx_job.addActionListener(new Ff_btn_ygxx(btn_ygx_job,p2));
	    btn_ygx_zc.addActionListener(new Ff_btn_ygzc(btn_ygx_zc,p2));
	    btn_ygx_kq.addActionListener(new Ff_btn_ygjs(btn_ygx_kq,p2));
	    btn_cwg_jf.addActionListener(new Ff_btn_cwsr(btn_cwg_jf,p2));
	    btn_cwg_zc.addActionListener(new Ff_btn_cwzc(btn_cwg_zc,p2));
	    btn_wpg_cc.addActionListener(new Ff_btn_wpxx(btn_wpg_cc,p2));
	    btn_wpg_room.addActionListener(new Ff_btn_room(btn_wpg_room,p2));
	    btn_wpg_kc.addActionListener(new Ff_btn_roomjs(btn_wpg_kc,p2));
	}

}
